<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!--
        Vue 指令 v-on
        1.作用: 注册事件 = 添加监听 + 提供处理逻辑
        2.语法:
            v-on:事件名 ="内联语句"
            v-on:事件名="methods中的函数名"
    -->
    <div id="app">
        <button v-on:click="count--">-</button>
        {{count}}
        <button v-on:click="count++">+</button>
    </div>

    <script src="../lib/vue.js"></script>

    <script>
        const app = new Vue({
            el: "#app",
            data() {
                return {
                    count: 0
                }
            }

        })
    </script>
</body>
</html>